import SvgIcon from './SvgIcon/index.vue'
import type { App, Component } from 'vue'

// 引入element-plus全部图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const components: { [name: string]: Component } = { SvgIcon }

// 用于注册components文件夹内部全部全局组件
export default {
  install(app: App) {
    Object.keys(components).forEach((key: string) => app.component(key, components[key]))
    for (const key in ElementPlusIconsVue) {
      app.component(key, ElementPlusIconsVue[key])
    }
  }
}
